//
//  Date+util.swift
//  casdon_swiftUI
//
//  Created by ww on 2025/5/2.
//

extension Date {

/// 获取当前 秒级 时间戳 - 10位
var timeStamp : String {
    let timeInterval: TimeInterval = self.timeIntervalSince1970
    let timeStamp = Int(timeInterval)
    return "\(timeStamp)"
}

/// 获取当前 毫秒级 时间戳 - 13位
var milliStamp : String {
    let timeInterval: TimeInterval = self.timeIntervalSince1970
    let millisecond = CLongLong(round(timeInterval*1000))
    return "\(millisecond)"
}
}
